<?php

namespace app\index\service\wechatprocess;
use app\common\model\jsm\Members as MembersModel;
use app\common\model\jooj_member\MemberIndex as MemberIndexModel;
use app\common\model\jooj_member\MemberIndexInfo as MemberIndexInfoModel;
use app\common\service\MemberGetwayService;
use app\common\model\oms\Companies as CompanyModel;
use app\common\model\jooj_member\ViewMemberIndex as ViewMemberIndexModel;

/**
 * 微信扫码service
 */
class WechatSubscribeProcessorService extends BaseProcessorService{

    private $_openid  = null;
    private $_appid   = null;
    private $_companyId = null;
    private $_mpId    = null;
    private $_xmlArr  = null;
    
    
    /**
     * 构造函数
     * @param type $mps
     * @param type $message
     */
    public function __construct($mps,$message) {
        
        $this->_xmlArr = $message['XmlArr'];
        
        $this->_openid = $message['openid'];
        $this->_appid = $message['app_id'];
        $this->_companyId = $mps['o_id'];
        $this->_mpId = $mps['mp_id'];
    }
    
    
    /**
     * 处理关注的逻辑
     * @return boolean
     */
    public function DealSubscribe(){
        $MemberGetwayService = new MemberGetwayService();
        return $MemberGetwayService->addFansInfo($this->_mpId, $this->_openid, $this->_companyId);
    }
    
}
